<!DOCTYPE html>
<html lang="en" style="background-color: rgb(243, 243, 240);">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">   
    <meta name="viewport"        
        content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>个人中心</title>
    <link rel="stylesheet" href="../public/css/footer.css">
    <link rel="stylesheet" href="../public/css/reset.css">
    <link rel="stylesheet" href="../public/css/all_use.css">
    <link rel="stylesheet" href="../public/css/wode.css">
    <script src="../public/js/utils/utils.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@2.12/lib/index.css" />
    <script src="https://res2.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
    <script src="https://cdn.bootcss.com/qs/6.7.0/qs.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6/dist/vue.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/vant@2.12/lib/vant.min.js"></script>
</head>

<body>
    </div>
    <div id="app">
            <div class="nc">
                <img :src="account.head" class="tx">
                <div style="display: flex;flex-direction: column;">
                    <div class="wz">{{account.nickname}}</div>
                    <div class="wz">{{account.flag==1?"普通会员":account.flag==2?"代理商":"运营商"}}</div>
                </div>

            </div>
            <div class="bj" style="height: 76px;">
                <div class="qq" @click="tixian(account.money)">
                    <div class="jq">{{account.money}}元</div>
                    <div class="sr">总收入</div>
                </div>
                <div class="qq" @click="go(2)">
                    <div class="jq">{{account.withdrawed}}元</div>
                    <div class="sr">已提现</div>
                </div>
                <div class="qq" @click="go(1)">
                    <div class="jq">{{account.withdrawing}}元</div>
                    <div class="sr">提现中</div>
                </div>
                <!--<div class="qq">-->
                    <!--<div class="jq">1000</div>-->
                    <!--<div class="sr">普通VIP人数</div>-->
                <!--</div>-->
                <!--<div class="qq">-->
                    <!--<div class="jq">1000</div>-->
                    <!--<div class="sr">代理商人数</div>-->
                <!--</div>-->
                <!--<div class="qq">-->
                    <!--<div class="jq">1000</div>-->
                    <!--<div class="sr">运营商人数</div>-->
                <!--</div>-->
            </div>
            <div class="bj1">
                <div class="qq1" onclick="router('/app/zhongjian.html')">
                    <img src="../public/img/czjl.png" class="tp">
                    <div>充值记录</div>
                </div>
                <div class="qq1" onclick="router('/app/tousu.html')">
                    <img src="../public/img/tsjy.png" class="tp">
                    <div>投诉建议</div>
                </div>
                <div class="qq1" @click="router(account.openId)">
                    <img src="../public/img/wddd.png" class="tp">
                    <div>我的订单</div>
                </div>
            </div>
        <div class="bj1">
            <div class="qq1" @click="tuiguang()">
                <img src="../public/img/wdkh.png" class="tp">
                <div>推广二维码</div>
            </div>
            <div class="qq1" @click="team()">
                <img src="../public/img/wdkh.png" class="tp">
                <div>我的团队</div>
            </div>
                <div class="qq1" @click="popout()">
                    <img src="../public/img/wdkh.png" class="tp">
                    <div>联系客服</div>
                </div>
            </div>
        <van-dialog v-model="showt" title="推广二维码" >
            <div style="position: relative">
                 <img :src="share.service" style="width: 100%;height: 100%;">
                <img :src="qrcode" style="    width: 120px;
    height: 120px;
    margin-left: 12%;
    z-index: 999;
    position: absolute;
    top: 60px;
    right: 100px;"/>
            </div>

        </van-dialog>
            <van-dialog v-model="show" title="客服二维码">
                <img :src="kefu.service" style="width: 250px;height: 250px;margin-left: 12%;"/>
            </van-dialog>
        <!-- <tabbar index="3"></tabbar> -->
    </div> 
</body>
<!-- <script src="../public/js/components/tabbar.js"></script> -->
<script type="module">
    import ajax from "../public/js/api/api.js";
    var app = new Vue({
        el: '#app',
        data: {
            account: {},
            show: false,
            kefu: {},
            share:{},
            showt:false,
            qrcode:''
        },
        created() {
            this.abc();
            this.findAfter();
            this.getQr();
        },
        methods: {
            tixian(money){
                window.location.href = `./tixian.html?money=${money}`;
            },
            go(id){
                window.location.href = `./log.html?id=${id}`;
            },
            abc() {
                ajax
                    .findAccount2({
                    })
                    .then((res) => {
                        if (res.data.code == 0) {
                            this.account = res.data.data
                            console.log(res.data.data);
                        }
                    })
            },
            popout() {
                this.show = true;
            },
            tuiguang(){
                // this.showt = true;
                window.location.href = `./share.html`;
            },
            router(openId){
                window.location.href = `./ddlb.html?openid=${openId}`;
            },
            findAfter(){
                ajax
                .findAfter()
                .then((res)=>{
                    this.kefu = res.data.data[0]
                    this.share = res.data.data[1]
                })
            },
            getQr(){
                ajax
                    .getQr()
                    .then((res)=>{
                        this.qrcode = "https://www.lofter.com/genBitmaxImage?url=http://coss1.fylac.com/api/user/invite?uniCode="+res.data.data+"&h=200&w=200";
                    })
            },
            team(){
                window.location.href = `./team.html`;
            }
        }
    })


</script>

</html>